package com.daylive.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daylive.dao.LogDao;
import com.daylive.model.SysLog;
import com.daylive.page.Page;


@Service
public class LogService {
	private final int PAGE_SIZE = 10;
	@Autowired
	private LogDao logDao;
	
	public Page<SysLog> getSysLogList(int pageNumber) {
		Page<SysLog> page = new Page<SysLog>(pageNumber, PAGE_SIZE);
		List<SysLog> list = logDao.getSysLogList(page);
		page.setResultList(list);
		return page;
	}
	public int addSysLog(SysLog sysLog) {
		return logDao.addSysLog(sysLog);
	}
	public int delSysLog(int id) {
		return logDao.delSysLog(id);
	}
	public int delAll(String[] ids) {
		return logDao.delAll(ids);
	}

}
